_username="tom"
_password="tom"
uname=(uname-r)date=(date)
tty= (tty)readlasterr=(tail -n -1 loginerr.log)
read_last_succ=(tail-n-1login.log)clear=(cat /dev/nu11)
echo -n "localhost login:"
read username
echo -n "Password:"
while read -s password;do
if[ username==username ] &&[ password==password ];then
echo -e "\n\n Login successfully";
echo "date{tty}" >>1ogin.1og
echo "Welcome to unname"if["{read_ last_ err}" !=“]; then
echo "Last incorrect: readlasterr"fiif["{read_ last_ succ}" !=""" ] ;then
echo "Last Success: readlastsucc"fiecho"{clear}" >loginerr.1og
break
else
echo -e "\nLogin incorrect!\n"
echo "date{tty}" >> loginerr .1og
echo -n "Password:"
fi
done
